/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxinline.modelo;

import br.com.foxinline.enums.TipoSUS;
import br.com.foxinline.enums.TipoVinculacao;
import br.com.foxinline.enums.TipoVinculo;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;

/**
 *
 * @author ely
 */
@Entity
public class VinculoEmpregaticio implements Serializable {

    @Id
    @SequenceGenerator(sequenceName = "seq_vinculo", name = "seq_vinculo", allocationSize = 1)
    @GeneratedValue(generator = "seq_vinculo", strategy = GenerationType.SEQUENCE)
    private Long id;
    private Integer registroConselhoClasse;
    @Enumerated(EnumType.STRING)
    private TipoSUS  tipoSUS;
    @Enumerated(EnumType.STRING)
    private TipoVinculacao tipoVinculacao;
    @Enumerated(EnumType.STRING)
    private TipoVinculo tipoVinculo;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date    dataEntrada;
    private Integer horaAmbulatorial;
    private Integer horaHospitalar;
    private Integer horaOutros;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getRegistroConselhoClasse() {
        return registroConselhoClasse;
    }

    public void setRegistroConselhoClasse(Integer registroConselhoClasse) {
        this.registroConselhoClasse = registroConselhoClasse;
    }

    public TipoSUS getTipoSUS() {
        return tipoSUS;
    }

    public void setTipoSUS(TipoSUS tipoSUS) {
        this.tipoSUS = tipoSUS;
    }

    public TipoVinculacao getTipoVinculacao() {
        return tipoVinculacao;
    }

    public void setTipoVinculacao(TipoVinculacao tipoVinculacao) {
        this.tipoVinculacao = tipoVinculacao;
    }

    public TipoVinculo getTipoVinculo() {
        return tipoVinculo;
    }

    public void setTipoVinculo(TipoVinculo tipoVinculo) {
        this.tipoVinculo = tipoVinculo;
    }

    public Date getDataEntrada() {
        return dataEntrada;
    }

    public void setDataEntrada(Date dataEntrada) {
        this.dataEntrada = dataEntrada;
    }

    public Integer getHoraAmbulatorial() {
        return horaAmbulatorial;
    }

    public void setHoraAmbulatorial(Integer horaAmbulatorial) {
        this.horaAmbulatorial = horaAmbulatorial;
    }

    public Integer getHoraHospitalar() {
        return horaHospitalar;
    }

    public void setHoraHospitalar(Integer horaHospitalar) {
        this.horaHospitalar = horaHospitalar;
    }

    public Integer getHoraOutros() {
        return horaOutros;
    }

    public void setHoraOutros(Integer horaOutros) {
        this.horaOutros = horaOutros;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 97 * hash + (this.registroConselhoClasse != null ? this.registroConselhoClasse.hashCode() : 0);
        hash = 97 * hash + (this.tipoSUS != null ? this.tipoSUS.hashCode() : 0);
        hash = 97 * hash + (this.tipoVinculacao != null ? this.tipoVinculacao.hashCode() : 0);
        hash = 97 * hash + (this.tipoVinculo != null ? this.tipoVinculo.hashCode() : 0);
        hash = 97 * hash + (this.dataEntrada != null ? this.dataEntrada.hashCode() : 0);
        hash = 97 * hash + (this.horaAmbulatorial != null ? this.horaAmbulatorial.hashCode() : 0);
        hash = 97 * hash + (this.horaHospitalar != null ? this.horaHospitalar.hashCode() : 0);
        hash = 97 * hash + (this.horaOutros != null ? this.horaOutros.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final VinculoEmpregaticio other = (VinculoEmpregaticio) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if (this.registroConselhoClasse != other.registroConselhoClasse && (this.registroConselhoClasse == null || !this.registroConselhoClasse.equals(other.registroConselhoClasse))) {
            return false;
        }
        if (this.tipoSUS != other.tipoSUS) {
            return false;
        }
        if (this.tipoVinculacao != other.tipoVinculacao) {
            return false;
        }
        if (this.tipoVinculo != other.tipoVinculo) {
            return false;
        }
        if (this.dataEntrada != other.dataEntrada && (this.dataEntrada == null || !this.dataEntrada.equals(other.dataEntrada))) {
            return false;
        }
        if (this.horaAmbulatorial != other.horaAmbulatorial && (this.horaAmbulatorial == null || !this.horaAmbulatorial.equals(other.horaAmbulatorial))) {
            return false;
        }
        if (this.horaHospitalar != other.horaHospitalar && (this.horaHospitalar == null || !this.horaHospitalar.equals(other.horaHospitalar))) {
            return false;
        }
        if (this.horaOutros != other.horaOutros && (this.horaOutros == null || !this.horaOutros.equals(other.horaOutros))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "VinculoEmpregaticio{" + "id=" + id + ", registroConselhoClasse=" + registroConselhoClasse + ", tipoSUS=" + tipoSUS + ", tipoVinculacao=" + tipoVinculacao + ", tipoVinculo=" + tipoVinculo + ", dataEntrada=" + dataEntrada + ", horaAmbulatorial=" + horaAmbulatorial + ", horaHospitalar=" + horaHospitalar + ", horaOutros=" + horaOutros + '}';
    }
        
}
